Skip to content

Add message when ASGI and WSGI is enabled #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 4, 2021
Merged

Add message when ASGI and WSGI is enabled #88

merged 5 commits into from
May 4, 2021

Conversation

Hazhzeng
Copy link
Contributor

@Hazhzeng Hazhzeng commented May 3, 2021

Related Issues

Fix: #71
Fix: Azure/azure-functions-python-worker#839

Description

  1. Now when the WSGI and ASGI middleware start, we will emit Instantiating Azure Functions ASGI middleware. or Instantiating Azure Functions WSGI middleware. log message for the very first time when the middleware instantiated either in main = WsgiMiddleware(app) syntax or def func(req, context): return WsgiMiddleware(app).handle(req, context) syntax.
  2. Fix an issue where the middlewares fail to accept the context parameter.

Todo

  1. In the worker, we need to direct azure.functions log into system log category.

cc: @tonybaloney @stefanushinardi @vrdmr

@Hazhzeng Hazhzeng requested review from anirudhgarg and vrdmr as code owners May 3, 2021 17:44
@github-actions
Copy link

github-actions bot commented May 3, 2021

✅ Result of Pytest Coverage

@Hazhzeng Hazhzeng requested a review from stefanushinardi May 3, 2021 19:31
@Hazhzeng Hazhzeng requested a review from AnatoliB as a code owner May 3, 2021 19:32
Copy link
Member

@vrdmr vrdmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

nit - comments wherever needed.

@Hazhzeng Hazhzeng merged commit 800a75b into dev May 4, 2021
@Hazhzeng Hazhzeng deleted the hazeng/wsgi-fix branch May 4, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] add_function is incorrectly requiring context arg to be Context type annotations for WsgiMiddleware cause app to not be startable
3 participants